<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生端首页</title>
    <link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
    <link href="../css/button1.css" rel="stylesheet">
    <script src="../js/jquery.min.js"></script>
    <style>
        /*背景*/
        body{
            background-color: #eafdfd;
        }
        /*欢迎信息*/
        #welcome{
            font-size: 30px;
            margin-left: 600px;
        }
        #welcome_name{
            font-size: 20px;
        }
        #exit{
            margin-left: 50px;
            color: #2aabd2;
        }
        #img_hint{
            width: 300px;
        }

        /*按钮居中*/
        .but_1{
            width: 160px;
            height: 45px;
            margin: auto;
            margin-top: 50px;
        }

    </style>
    <script>
        $(function () {
            //页面加载 改变欢迎信息
            $.get("stu/getStudent",{},function (data) {
                //设置欢迎信息
                $("#welcome_name").html(data.sname);
            },"json");
            //各个按钮单击后的页面跳转
            $("#query_information").click(function () {
                location.href="essential_information.html";
            });
            $("#query_violate").click(function () {
                location.href="violate.html";
            });
            $("#apply_for").click(function () {
                location.href="apply_for.html";
            });
            $("#weather").click(function () {
                location.href="weather.html";
            });
            $("#charge").click(function () {
                $("#charge1").css("display","block")
            });


        });

    </script>

</head>
<body>
    <div>
        <!-- 宣传语 -->
        <img src="../img/stu_1.png" id="img_propagation">
        <span id="welcome">欢迎您：</span>
        <span id="welcome_name">张三</span>
        <a href="javascript:location.href='stu/exit';" id="exit">退出登录</a>
        <!-- 选择操作图片 -->
        <div style="height: 65px;width: 250px;margin: auto"><img src="../img/stu_2.png" id="img_hint"></div>
        <!-- 按钮 -->
        <div class="but_1"><button id="query_information" class="custom-btn btn-2">查询基本信息</button> </div>
        <div class="but_1"><button id="query_violate" class="custom-btn btn-8"><span>查询违纪情况</span></button> </div>
        <div class="but_1"><button id="apply_for" class="custom-btn btn-2">申请调换宿舍</button> </div>
        <div class="but_1"><button id="weather" class="custom-btn btn-8">查询天气</button> </div>
        <div class="but_1"><button id="charge" class="custom-btn btn-2">交电费</button> </div>

        <div class="but_1" style="display: none" id="charge1">
            <form action="stu/pay" method="post" class="form-inline">
                <div class="form-group">
                    <label for="exampleInputEmail2">电费</label>
                    <input type="text" class="form-control" id="exampleInputEmail2" placeholder="请输入您要交的电费" name="charge">
                </div>
                <button type="submit" class="btn btn-default">确定</button>
            </form>
        </div>

    </div>

</body>
</html>